<?php
/*
 * The default template for displaying video
 */
?>

<!-- Start of blog wrapper -->
<article class="blog_wrapper">

<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

<!-- Start of posted details -->
<div class="posted_details">

<!-- Start of post content first -->
<div class="post_content_first">
<span class="meta"><?php the_time('F jS, Y') ?></span>

</div><!-- End of post content first -->

<!-- Start of post content -->
<div class="post_content">
<span class="meta"><?php _e( 'Posted by:', 'genesis' ); ?> <?php the_author() ?></span>

</div><!-- End of post content -->

<!-- Start of post content -->
<div class="post_content">
<span class="meta"><?php _e( 'Posted In:', 'genesis' ); ?> <?php the_category(', '); ?></span>

</div><!-- End of post content -->

<?php if ('open' == $post->comment_status) { ?>

<!-- Start of meta -->
<div class="metacomments">
<div class="comments"></div>

<?php comments_popup_link( '0', '1 comment', '% comments', 'comments-link', ''); ?>

</div><!-- End of meta -->

<?php } ?>


</div><!-- End of posted details -->

<!-- Start featured image -->
<div class="featured_image">

<?php if ( has_post_format( 'video' )) {
$content = get_the_content();
$link_string = my_extract_from_string('<iframe src=', '/iframe>', $content);
$link_bits = explode('"', $link_string);
foreach( $link_bits as $bit ) {
	if( substr($bit, 0, 1) == '>') $link_text = substr($bit, 1, strlen($bit)-2);
	if( substr($bit, 0, 4) == 'http') $link_url = $bit;
}?>

<iframe src="<?php echo $link_url;?>" frameborder="0" allowfullscreen width="1200" height="583" style="z-index:999; position:relative;"></iframe>

<?php }
else {
?>

<?php } ?>

</div><!-- End of featured image -->

<!-- Start of featured text nopad -->
<div class="featured_text_nopad">
<?php the_excerpt(); ?>

<?php 
if ( function_exists( 'get_option_tree' ) ) {
$readmoretext = get_option_tree( 'vn_readmore' );
} ?>

<a href="<?php the_permalink(); ?>"><?php echo stripslashes($readmoretext); ?></a>

</div><!-- End of featured text nopad -->

<!-- Start of clear fix --><div class="clear"></div>      

</article><!-- End of blog wrapper -->
